{if $full_page}
{include file="pageheader.htm"}
{insert_scripts files="validator.js"}
<div class="tab-div" id="listDiv">
{/if}
  <!-- tab bar -->
  {include file="flashplay_tab.htm"}
  <!-- body -->
  <div class="tab-body">
  <div class="list-div list-div-ad" id="listDiv">
  <table cellspacing='1' cellpadding='3' id='list-table' width="70%">
    <tr>
      <th width="400px">{$lang.title_flash_name}</th>
      <th>{$lang.title_flash_type}</th>
      <th>{$lang.title_flash_time}</th>
      <th>{$lang.title_flash_status}</th>
    <th width="70px">{$lang.handler}</th>
    </tr>
    {foreach from=$ad_list item=item key=key}
    <tr>
      <td>{$item.ad_name}</td>
      <td align="left">{$item.type_name}</td>
      <td align="left">{$item.add_time}</td>
      <td align="center"><a href="javascript:custom_status({$item.ad_id}, {$item.ad_status});void(0);" title="{$lang.custom_change_img}"><img src="images/{if $item.ad_status eq 0}no.gif{else}yes.gif{/if}" width="16" height="16" border="0" /></a></td>
      <td align="center">
        <a href="flashplay.php?act=custom_edit&id={$item.ad_id}" title="{$lang.edit}"><img src="images/icon_edit.gif" width="16" height="16" border="0" /></a>
        <a href="flashplay.php?act=custom_del&id={$item.ad_id}" onclick="return check_del();" title="{$lang.custom_drop_img}"><img src="images/icon_drop.gif" width="16" height="16" border="0" /></a>
      </td>
    </tr>
    {/foreach}
  </table>
      <table cellspacing="0">
    <tr>
      <td>
        <input name="add" type="submit" id="btnSubmit" value="{$action_link_special.text}" onclick="location.href='{$action_link_special.href}';" class="button"/>
      </td>
    </tr>
  </table>
  </div>

 
  </div>

{if $full_page}
</div>
<script language="JavaScript">
<!--
// 初始页面参数
var status_code = 0; //{$ad.ad_type};


onload = function()
{
  // 开始检查订单
  startCheckOrder();

  // 初始化表单项
  //initialize_form(status_code);
}

/**
 * 广告状态修改
 */
function custom_status(ad_id, ad_status)
{
  if (ad_id)
  {
    Ajax.call('flashplay.php?is_ajax=1&act=custom_status&ad_status=' + ad_status, 'id=' + ad_id, custom_status_edit, 'GET', 'JSON');
  }
}
function custom_status_edit(result)
{
  if (result.error == 0)
  {
    document.getElementById('listDiv').innerHTML = result.content;

    // 初始化表单项
    initialize_form(status_code);
  }
}

function check_del()
{
  if (confirm('{$lang.custom_del_confirm}'))
  {
    return true;
  }
  else
  {
    return false;
  }
}

/**
 * 系统设置提示
 */
function system_set()
{
  alert('{$lang.tab_change_alert}');
}

/**
 * 判断当前浏览器类型
 */
function navigator_type()
{
  var type_name = '';

  if (navigator.userAgent.indexOf('MSIE') != -1)
  {
    type_name = 'IE'; // IE
  }
  else if(navigator.userAgent.indexOf('Firefox') != -1)
  {
    type_name = 'FF'; // FF
  }
  else if(navigator.userAgent.indexOf('Opera') != -1)
  {
    type_name = 'Opera'; // Opera
  }
  else if(navigator.userAgent.indexOf('Safari') != -1)
  {
    type_name = 'Safari'; // Safari
  }
  else if(navigator.userAgent.indexOf('Chrome') != -1)
  {
    type_name = 'Chrome'; // Chrome
  }

  return type_name;
}
//-->
</script>

{include file="pagefooter.htm"}
{/if}